package com.tan.lbs.util;

import java.util.Comparator;

import com.tan.lbs.entity.QuestHeader;

/**
 * Sorting ascendingly order by thq quest number.
 * Copyright by Zhensheng Tan only for Final Year Project Use.
 * Class description:
 * @author Zhensheng Tan 
 *
 */
public class QuestHeaderComparator implements Comparator<QuestHeader> {

	@Override
	public int compare(QuestHeader arg1, QuestHeader arg2) {
		QuestHeader questHeader1 = (QuestHeader)arg1;
		QuestHeader questHeader2 = (QuestHeader)arg2;
		if(questHeader1.getQuestOrder() > questHeader2.getQuestOrder()) {
			return 1;
		} else return 0;
	}

}
